/*
 * Copyright (c) 2023, 2023,yzc.cn All rights reserved.
 *
 */
package cn.yzc;

/**
 * <p>Project: MybatisPro - SqlSessionFactoryUtils</p>
 * <p>Powered by yzc On 2023-10-08 20:02:53</p>
 * <p>描述：单列模式 饱汉式<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
public class SqlSessionFactoryUtils {
    /**
     * 声明本类的实例
     */
    private  static  SqlSessionFactoryUtils instance = null;

    /**
     * 构造方法私有化
     */
    private  SqlSessionFactoryUtils(){

    }

    /**
     * 提供静态方法
     * 饱汉式：类的实例只有类在调用的时才会创建
     * @return 本类的实例
     */

    public  static SqlSessionFactoryUtils getInstance(){
        if (null == instance){
            instance   =  new SqlSessionFactoryUtils();
        }
        return instance;
    }
}
